<!--
  Generated template for the SpareEditPage page.

  See http://ionicframework.com/docs/components/#navigation for more info on
  Ionic pages and navigation.
-->
<ion-header>

    <ion-navbar>
        <ion-title>
            修改
        </ion-title>
        <ion-buttons end>
            <button ion-button icon-only (tap)="dismiss()">
              <ion-icon name='close'></ion-icon>
            </button>
            <!-- <button ion-button icon-only (tap)="presentModal($event)"> 
                <ion-icon name='funnel'></ion-icon>
              </button> -->
        </ion-buttons> 
    </ion-navbar>
  
  </ion-header>


<ion-content>
  
  <ion-list>
      <ion-item>
        <ion-label fixed>产品编号</ion-label>
        <ion-input type="text" value="{{item.sp_catalog__sp_code}}" disabled></ion-input>
      </ion-item>
      <ion-item>
        <ion-label fixed>产品名称</ion-label>
        <ion-input type="text" value="{{item.sp_catalog__sp_name}}" disabled></ion-input>
      </ion-item>
      <ion-item>
        <ion-label fixed>规格型号</ion-label>
        <ion-input type="text" value="{{item.sp_catalog__sp_type}}" disabled></ion-input>
      </ion-item>
      <ion-item>
        <ion-label fixed>单位</ion-label>
        <ion-input type="text" value="{{item.sp_catalog__unit}}" disabled></ion-input>
      </ion-item>
  </ion-list>

  <ion-list>
      <ion-item>
          <ion-label>库位</ion-label>
          <ion-select [(ngModel)]="item.sp_catalog__stock_id" interface="popover">
            <ion-option value="{{house.sp_house__house_id}}" *ngFor="let house of houses">{{house.sp_house__house_name}}</ion-option>
          </ion-select>
        </ion-item>
      <ion-item>
        <ion-label fixed>数量</ion-label>
        <ion-input type="number" [(ngModel)]="item.sp_catalog__in_num"></ion-input>
      </ion-item>
      <ion-item>
        <ion-label fixed>价格</ion-label>
        <ion-input type="number" [(ngModel)]="item.sp_catalog__tax_price"></ion-input>
      </ion-item>
      <ion-item>
        <ion-label fixed>金额</ion-label>
        <ion-input type="number" value="{{item.sp_catalog__in_num*item.sp_catalog__tax_price}}" disabled></ion-input>
      </ion-item>
      <ion-item>
          <ion-label position="stacked">备注</ion-label>
          <ion-textarea rows="3" placeholder="输入备注" [(ngModel)]="item.sp_catalog__in_memo"></ion-textarea>
      </ion-item>
  </ion-list>


  <div style="text-align: center;margin:10px 10%;width: 80%;">
      <button ion-button block (tap)="dismiss()" class="theme-button-bg">
          完成
      </button>
  </div>
</ion-content>
